﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace ThesisSystem.Models
{
    public class Thesis
    {
        [Key]
        public int ThesisID { get; set; }

        [StringLength(100)]
        [Required(ErrorMessage = "*")]
        [DisplayName("论文标题")]
        public string ThesisTitle { get; set; }


        [StringLength(100)]
        [Required(ErrorMessage = "*")]
        public string StudentID { get; set; }

        [ForeignKey("Student")]
        public Guid UserID { get; set; }

        [DisplayName("论文开始时间")]
        [Required(ErrorMessage = "*")]
        public DateTime StartDate { get; set; }

        [DisplayName("论文结束时间")]
        [Required(ErrorMessage = "*")]
        public DateTime EndDate { get; set; }

        [StringLength(100)]
        [Required(ErrorMessage = "*")]
        [DisplayName("论文类型")]
        public string ThesisType { get; set; }

        [DisplayName("论文上传时间")]
        public DateTime UploadDate { get; set; }

        [DisplayName("评审状态")]
        public string ReviewStatus { get; set; }

        [DisplayName("得分")]
        public string Score { get; set; }

        [DisplayName("文件大小")]
        public string FileSize { get; set; }

        [DisplayName("文件名")]
        public string FileName { get; set; }

        // 一篇论文对应一个学生
        public virtual Student Student { get; set; }
        //public virtual Student Student { get; set; }
      
    }
}
